
// src/api/index.js
import axios from 'axios';

// 定义基础 URL，根据实际情况进行修改
const baseURL = 'http://localhost:5001/api_1_0';

// 登录 API 函数
export function getMenu(login) {
  return axios.get(`${baseURL}/sysUser/${encodeURIComponent(login.username)}`)
    .then(response => response.data)
    .catch(error => {
      console.error('Error during login check:', error);
      throw error;
    });
}